package cn.green.interaction.response.module;

import cn.green.interaction.response.enums.InteractionResult;
import org.springframework.http.HttpStatus;

import java.io.Serializable;

/**
 * Http响应对象，封装业务处理的结果
 * @param <T>
 */
public class HttpResponse<T> implements Serializable {

    protected InteractionResult result;//交互结果

    protected T data;//响应数据

    protected HttpStatus code;//响应状态码

    protected String message;//消息

    public InteractionResult getResult() {
        return result;
    }

    public void setResult(InteractionResult result) {
        this.result = result;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public HttpStatus getCode() {
        return code;
    }

    public void setCode(HttpStatus code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
